package com.caozf.factory.simplefactory;

import com.caozf.factory.IIPhone;

/**
 * 创建时间：2019/9/12 11:58
 * 创建人:曹子方
 */
public class SimpleFactory {
    public static IIPhone create(Class<? extends IIPhone> iphoneClass) {

        try {
            if (iphoneClass!=null) {
                return iphoneClass.newInstance();
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }
}
